import { createApp } from 'vue';
import { createPinia } from 'pinia';
import 'virtual:svg-icons-register';
import App from './App.vue';
import router from './router';
import gloablComponent from './index';
// 瀑布流
import waterfall from 'vue-waterfall2';
// icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// Svg 配置项
import svgIcon from './components/SvgIcon/index.vue';
// 增加的引入
import 'element-plus/dist/index.css';
import 'virtual:svg-icons-register';
// 日历
// a-li 图标库
import { createFromIconfontCN } from '@ant-design/icons-vue';

// piniachi持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);
app.use(gloablComponent);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// icon
app.component(
  'IconFont',
  createFromIconfontCN({
    scriptUrl: '//at.alicdn.com/t/c/font_4374920_l3ofrlv03zn.js' // 替换为你的阿里图标库链接
  })
);
app.use(createPinia());
app.use(router);
app.use(waterfall);
app.component('svg-icon', svgIcon);
app.use(pinia);
app.mount('#app');
